package com.tul.exercise.base.recursion;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * @author 第五天
 * 递归的树形节点
 */
public class EMSSimpleTree implements Serializable{
    /**
     * 父节点Id
     */
    private long pid;

    /**
     * Id
     */
    private long id;

    /**
     * 节点类型：4--网元，3--域，2--EMS节点，1--根节点
     */
    private int type;


    /**
     * 子节点
     */
    private EMSSimpleTree[] items;


    public long getPid() {
        return pid;
    }

    public void setPid(long pid) {
        this.pid = pid;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public EMSSimpleTree[] getItems() {
        return items;
    }

    public void setItems(EMSSimpleTree[] items) {
        this.items = items;
    }

    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
